<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>关闭二维码</title>
    <style>
        .box {
            position: relative;
            width: 74px;
            height: 88px;
            border: 1px solid #ccc;
            margin: 100px auto;
            font-size: 12px;
            text-align: center;
            color: #f40;
        }
        .box img {
            width: 60px;
            margin-top: 5px;
        }
        .close-btn {
            position: absolute;
            top: -1px;
            left: -16px;
            width: 14px;
            height: 14px;
            border: 1px solid #ccc;
            line-height: 14px;
            font-family: Arial, Helvetica, sans-serif;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="box">
        <img src = "./erweima.webp" alt="">
        <i class="close-btn">×</i>
    </div>
 
    <script>
        // const box = document.querySelector('.box');
        const  i = document.querySelector('i');
        // i.onclick = function() {
        //     i.parentNode.style.display = 'none';
        // }
        i.addEventListener('click',function(){
            i.parentNode.style.display = 'none';
        })
    </script>
</body>
</html>